#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QDialog>
#include <QLineEdit>
#include <QComboBox>
#include <QTextEdit>
#include <QLabel>
#include <QGridLayout>
#include <QLayout>

namespace Ui {
class MyDialog;
}

class MyDialog : public QDialog
{
    Q_OBJECT

public:
    explicit MyDialog(QWidget *parent = 0);
    ~MyDialog();

public:
    virtual void timerEvent(QTimerEvent*);

private:
    void BuildUI();

private slots:
    void updateTime();

private:
    //Left LayOut
    QLabel *pUsrNameLabel;
    QLabel *pNameLabel;
    QLabel *pSexLabel;
    QLabel *pDepartmentLabel;
    QLabel *pAgeLabel;
    QLabel *pOtherLabel;

    QLineEdit *pUsrNameLineEdit;
    QLineEdit *pNameLineEdit;
    QLineEdit *pAgeLineEdit;
    QTextEdit *pDepartmentTxtEdit;
    QComboBox *pSexComboBox;

    QGridLayout *pLeftLayout;

    //Right Layout
    QLabel *pHeadLabel;
    QLabel *pHeadIconLabel;
    QPushButton *pRefreshHeadBtn;
    QHBoxLayout *pTopRightLayout;

    QLabel *pIntroductionLabel;
    QTextEdit *pIntroductionTxtEdit;
    QVBoxLayout *pRightLayout;

    //Bottom Layout
    QPushButton *pOkBtn;
    QPushButton *pCancelBtn;
    QLabel *pTimerLabel;
    QHBoxLayout *pBottomLayout;

private:
    int m_TimerID;
};

#endif // MAINWINDOW_H
